﻿<Gui:XCaseGridBase
    x:Class="XCase.Gui.CommentGrid"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:Gui="clr-namespace:XCase.Gui" 
    HorizontalAlignment="Stretch"
    ScrollViewer.HorizontalScrollBarVisibility="Auto"
    SizeChanged="XCaseGridBase_SizeChanged"
    >
	<ScrollViewer ScrollViewer.HorizontalScrollBarVisibility="Auto"
                          ScrollViewer.VerticalScrollBarVisibility="Auto">
		<StackPanel Margin="0,0,0,10">
			<Grid Name="grid" Margin="5,0,5,0">
				<Grid.Resources>
					<Gui:ChangeCommentConverter x:Key="changeComment"/>
				</Grid.Resources>
				<Grid.RowDefinitions>
					<RowDefinition Height="25"/>
					<RowDefinition Height="20"  />
					<RowDefinition Height="25"  />
					<RowDefinition Height="Auto"  />
					<RowDefinition Height="25"  />
					<RowDefinition Height="Auto"  />
					<RowDefinition Height="25"  />
				</Grid.RowDefinitions>
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="60" MaxWidth="60"/>
					<ColumnDefinition MinWidth="62" />
				</Grid.ColumnDefinitions>
				<!-- Comment -->
				<Label  Name="mainLabel" Grid.Row="0" Grid.ColumnSpan="2" Focusable="True">
					Comment
				</Label>
				<!-- Comment Text -->
				<TextBox Name="commentText" 
                 Text="{Binding Path=Body, Converter={StaticResource changeComment}}" 
                 Grid.Row="1" Grid.RowSpan="4" Grid.ColumnSpan="2"
                 Height="150"
                 VerticalScrollBarVisibility="Auto"
                 HorizontalAlignment="Left"
                 KeyDown="KeyPressed_Down"
                 KeyUp="KeyPressed_Up"    
                 SizeChanged="element_SizeChanged"
                 TextWrapping="Wrap" MinWidth="120" />

				<!-- Comment appearance -->
				<Label Grid.Row="6" Grid.ColumnSpan="2" Focusable="True">
					Appearance</Label>
			</Grid>
			<Gui:AppearanceGrid x:Name="appearance"/>
		</StackPanel>
	</ScrollViewer>
</Gui:XCaseGridBase>
